// Place your Spring DSL code here
import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils

beans = {
    userDetailsService(ie.com.stamply.security.UserDetailsService)
       
    authenticationSuccessHandler(services.ie.com.stamply.security.StamplyAuthSuccessHandler) {
        def conf = SpringSecurityUtils.securityConfig       
        requestCache = ref('requestCache')
        defaultTargetUrl = conf.successHandler.defaultTargetUrl
        alwaysUseDefaultTargetUrl = conf.successHandler.alwaysUseDefault
        targetUrlParameter = conf.successHandler.targetUrlParameter
        useReferer = conf.successHandler.useReferer
        redirectStrategy = ref('redirectStrategy')
        adminUrl = "/admin"
        userUrl = "/customer/create"
    }    
    
}
